package com.hui.dead;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = DeadRabbitConfig.MAIL_ROUTING)
public class MailCustomer {

    @RabbitHandler
    public void process(String dead) {
//        try {
//            log.info("receive  data {} ", workOrderData);
//            OrderRequest request = JSON.parseObject(workOrderData, OrderRequest.class);
//            BaseResult baseResult = xxxService.save(request);
//            log.info("save  data {},result {}", workOrderData, baseResult.toString());
//        } catch (Exception e) {
//            log.warn("cousumers ribbitmq message {} error", workOrderData);
//            throw new Exception(ErrorCode.COUSUMERS_MQ_MESSAGE_FAIL);
//        }

        System.out.println("=======DeadCustomer " + dead);
    }

}
